package org.lds.message.center.client.properties;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.lds.message.center.client.constant.ClientConstant;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = ClientConstant.CLIENT_PREFIX)
public class MessageCenterClientProperties {
    private boolean enabled = true;
    private String endpoint;

    /**
     * http
     * grpc
     * local
     */
    private String connectionType = "local";

    public void setEndpoint(String endpoint) {
        this.endpoint = StringUtils.trimToNull(endpoint);
    }

    public void setConnectionType(String connectionType) {
        this.connectionType = StringUtils.trimToNull(connectionType);
    }
}
